package cn.saltybe.analysis.controller;

import cn.saltybe.analysis.util.ApiResponse;
import com.google.gson.JsonObject;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping(value = "/")
public class index {
    @ResponseBody
    @GetMapping("")
    public static String index(HttpServletResponse response) {
        JsonObject data = new JsonObject();
        data.addProperty("message", "Hello, world!");
        return ApiResponse.buildSuccessResponse(data).toString();
    }
}
